using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ChuangTouGui1:MonoBehaviour {

	[SerializeField] GameObject shouJiPrefab;
	[SerializeField] DialougeClip dialougeFirstTime;
	[SerializeField] DialougeClip dialougeAfterFirstTime;


	void OnInteraction() {
		InteractionTarget interactable = GetComponent<InteractionTarget>();
		if(interactable.flag==0) {
			VNController.instance.EnterDialouge(
				dialougeFirstTime,
				() => {
					PlayerController.instance.AddToInventoryFromPrefab(shouJiPrefab);
					interactable.flag=1;
				}
			);
		} else {
			VNController.instance.EnterDialouge(dialougeAfterFirstTime);
		}
	}

}
